import request from 'umi-request';

export async function getNativePlaces(id) {
  return request(`/hr-ssc/api/api-admin/job/getNativeplace`, {
    method: 'get',
  }).then((res) => {
    return res.data;
  });
}

export async function getEmployeeById(id) {
  return request(`/hr-ssc/api/api-admin/member/getEmployeeById/${id}`, {
    method: 'get',
  }).then((res) => {
    return res.data;
  });
}

export async function getEmployeeByIdAuth(id) {
  return request(`/hr-ssc/api/api-admin/member/getEmployeeByIdAuth`, {
    method: 'post',
    data: {id}
  }).then((res) => {
    return res.data;
  });
}

export async function updateMainInfo(data) {
  return request(`/hr-ssc/api/api-admin/member/updateMainInfo`, {
    method: 'post',
    data: data
  }).then((res) => {
    return res;
  });
}

